<template>
  <div>
    <h2>已完成</h2>
    <list :list="list"></list>
  </div>
</template>

<script>
import { defineComponent, computed, watch } from 'vue'
import { useStore } from 'vuex'
import List from '@/components/list'
export default defineComponent({
  name: 'completed',
  components: {
    List
  },
  setup () {
    const store = useStore()
    const list = computed(() => store.getters.completedList)
    watch(list, () => {
      console.log(list.value)
    })
    return {
      list
    }
  }
})
</script>

<style scoped>

</style>
